<?

require_once ("util/Transformer.php");
require_once ("util/Generator.php");
require_once ("dao/MadDAO.php");


class SalvarFormularioZoom {

	public function show()
	{

		$transformer = new Transformer();
		$generator = new Generator();
		$transformer->setDirFisicoTemplates("template/");
		$transformer->setArquivoTemplate("esqueletoBase.htm");
		$valoresTroca = array ();
		$valoresTroca["titulo"] = $this->getTitulo();
		$valoresTroca["footer"] = $generator->getFooter();
		$valoresTroca["erro"] = $generator->getErro();
		$valoresTroca["body"] = $this->getBody();
		$transformer->setValoresTroca($valoresTroca);
		$saida = $transformer->processaHTML();
		echo $saida;
	}

	private function getTitulo()
	{
		$titulo = "SIMweb :: Pesquisa MAD";
		return $titulo;
	}



	private function getBody()
	{
		//print_r($_REQUEST);

		$MadDao = new MadDAO();

		$MadDao -> GetDadosAnaliseByRegistro($_REQUEST['registro'], $_REQUEST);



		$transformer = new Transformer();
		$transformer->setDirFisicoTemplates("template/MAD/");
		$transformer->setArquivoTemplate("ActionSalvarFormularioZoom.htm");
		$transformer->setValoresTroca($valoresTroca);
		$saida = $transformer->processaHTML();
		return $saida;

	}
}

?>
